{{#section "index"}}
    <link rel="stylesheet" href="../stylesheets/layout100de-index.css">
{{/section}}

<form class="mb-4">
    <div class="row">
        <div class="col">
            <input type="text" class="form-control" placeholder="First name">
        </div>
        <div class="col">
            <input type="text" class="form-control" placeholder="Last name">
        </div>
        <div class="col">
            <select class="custom-select" >
                <option selected>Choose...</option>
                <option value="1">One</option>
                <option value="2">Two</option>
                <option value="3">Three</option>
            </select>
        </div>
        <div class="col">
            <input class="btn" id="finds" type="button" value="查询">
            <button class="btn" id="adds"><a style="color:#333" href="/admin/main/addBanner">新增</a></button>
        </div>
    </div>
</form>

<table class="table">
    <thead class="thead-light">
    <tr>
        <th scope="col">#</th>
        <th scope="col">First</th>
        <th scope="col">Last</th>
        <th scope="col">Handle</th>
    </tr>
    </thead>
    <tbody>
    <tr>
        <th scope="row">1</th>
        <td>Mark</td>
        <td>Otto</td>
        <td><button class="btn">删除</button><button class="btn">修改</button></td>
    </tr>
    <tr>
        <th scope="row">2</th>
        <td>Jacob</td>
        <td>Thornton</td>
        <td><button class="btn">删除</button><button class="btn">修改</button></td>
    </tr>
    <tr>
        <th scope="row">3</th>
        <td>Larry</td>
        <td>the Bird</td>
        <td><button class="btn">删除</button><button class="btn">修改</button></td>
    </tr>
    </tbody>
</table>

<script>
    $("#finds").click(function(){
        $.ajax({
            url : urls + "seckillAction/insertSeckillOne",
            type : 'POST',
            cache : false,
            data : new FormData($('#uploadForm')[0]),
            processData : false,
            contentType : false
        }).done(function(res) {
            //console.log(res)
            if (res == true) {
                alert("提交成功")
            } else if (res == 250) {
                alert("该商品名称已存在，请勿重复提交")
            } else {
                alert("提交失败")
            }
        }).fail(function(res) {});
    })
    $(function(){
        $.get('/admin/main/getBanner',function(res){
            console.log(res);
        })
    })
</script>